package com.yangjun.common.enums;

public enum SummaryCycleEnum {
	
	naturalDay("自然天","naturalDay"),naturalWeek("自然周","naturalWeek"),naturalMonth("自然月","naturalMonth"),custom("自定义","custom");
	private String summaryCycleName;
	private String summaryCycleValue;


	private SummaryCycleEnum(String summaryCycleName, String summaryCycleValue) {
		this.summaryCycleName = summaryCycleName;
		this.summaryCycleValue = summaryCycleValue;
	}



	public String getSummaryCycleName() {
		return summaryCycleName;
	}

	public void setSummaryCycleName(String summaryCycleName) {
		this.summaryCycleName = summaryCycleName;
	}



	public String getSummaryCycleValue() {
		return summaryCycleValue;
	}



	public void setSummaryCycleValue(String summaryCycleValue) {
		this.summaryCycleValue = summaryCycleValue;
	}

	public static String getSummaryCycleName(String summaryCycleValue){
		 if("naturalDay".equals(summaryCycleValue)){
			 return naturalDay.getSummaryCycleName();
		 }else if("naturalWeek".equals(summaryCycleValue)){
			 return naturalWeek.getSummaryCycleName();
		 }else if("naturalMonth".equals(summaryCycleValue)){
			 return naturalMonth.getSummaryCycleName();
		 }else if("custom".equals(summaryCycleValue)){
			 return custom.getSummaryCycleName();
		 }else{
			 return null;
		 }
	 }
}
